﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Bookkeeping.Mvc.Models.Rendering;
using Bookkeeping.Core.Services;

namespace Bookkeeping.Mvc.Models.Budget
{
    public class TotalViewModel
    {
        public TotalViewModel(double totalIncludingSavings, double totalExcludingSavings)
        {
            TotalExcludingSavings = totalExcludingSavings;
            TotalIncludingSavings = totalIncludingSavings;
        }

        public double TotalIncludingSavings { get; set; }
        public double TotalExcludingSavings { get; set; }

        public string TotalIncludingSavingsString
        {
            get
            {
                return Formatter.FormatMonetaryAmount(TotalIncludingSavings);
            }
        }

        public string TotalExcludingSavingsString
        {
            get
            {
                return Formatter.FormatMonetaryAmount(TotalExcludingSavings);
            }
        }

        public string TotalIncludingSavingsCssClass
        {
            get
            {
                return Css.GetAmountClass(TotalIncludingSavings);
            }
        }

        public string TotalExcludingSavingsCssClass
        {
            get
            {
                return Css.GetAmountClass(TotalExcludingSavings);
            }
        }
    }
}
